package com.test.spring2025_3_31.Listener;

import com.test.spring2025_3_31.Constants.Constants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
// 工作队列模式
public class WorkRabbitListener {

    @RabbitListener(queues = Constants.WORK_QUEUE)
    public void queueListener1(String message) {
        log.info("[ queueListener1 ] 接收消息：" + message);
    }

    @RabbitListener(queues = Constants.WORK_QUEUE)
    public void queueListener2(String message){
        log.info("[ queueListener2 ] 接收消息：" + message);
    }

}
